home *** CD-ROM | disk | FTP | other *** search
/ Aminet 40 / Aminet 40 (2000)(Schatztruhe)[!][Dec 2000].iso / Aminet / util / boot / BlizKick.lha / BlizKick / Modules / BPPCFix040.ASM < prev    next >
Assembly Source File  |  2000-09-04  |  2KB  |  110 lines

  1. ; FILE: Source:modules/BPPCFix040.ASM          REV: 1 --- Disable 680x0 libraries of blizzppc
  2.  
  3. ;
  4. ; BPPCFix 040 module for BlizKick
  5. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  6. ; Written by Harry Sintonen.
  7. ;
  8. ; This module disables BlizzPPC flashrom 68040.library
  9. ; (and 68060.library if available).
  10. ;
  11. ; 1.0: initial release.
  12. ; 1.1: fixed to require EXTRESBUF. this prevents possible priority
  13. ;      problems.
  14. ;
  15. ; based on:
  16. ;
  17. ;** BPPCFix_kickcode.asm
  18. ;**
  19. ;** Disables ppc.library resident modules on Amigas with BPPC
  20. ;** Written in 1998 by Frank Wille <frank@phoenix.owl.de>
  21. ;**
  22. ;** V1.0  26-Dec-98
  23. ;**       created
  24. ;
  25. ;
  26. ;
  27.  
  28.     incdir    "include:"
  29.     include    "exec/types.i"
  30.     include    "exec/libraries.i"
  31.  
  32.     include    "exec/execbase.i"
  33.  
  34.     include    "blizkickmodule.i"    ; Some required...
  35.  
  36.     SECTION    MODULE,CODE
  37. _DUMMY_LABEL
  38.  BK_MOD BKMF_ExtResBuf|BKMF_SingleMode,_end,(RTF_COLDSTART)<<24+37<<16+NT_UNKNOWN<<8+100,_name,_idstr,_init
  39.  
  40. ; Require EXTRESBUF for this module, Singlemode on,
  41. ; COLDSTART module, requires KS V37.x or better, module type NT_UNKNOWN, priority 100.
  42.  
  43. _init    movem.l    d0-a6,-(sp)
  44.     move.l    (4).w,a6
  45.  
  46.     jsr    (-$84,a6)        ; Forbid()
  47.  
  48.     move.l    (ResModules,a6),a0
  49.     move.l    a0,a1
  50.     bra.b    loop_end
  51. loop:
  52.     move.l    d0,(a1)+
  53.     bpl.b    1$
  54.     bclr    #31,d0
  55.     move.l    d0,a0
  56.     move.l    d0,a1
  57.     bra.b    loop_end
  58. 1$:    move.l    d0,a4
  59.  
  60.     lea    (da040_name,pc),a3
  61.     bsr.b    killtag
  62.     beq.b    loop_end
  63.  
  64.     lea    (da060_name,pc),a3
  65.     bsr.b    killtag
  66.  
  67. loop_end:
  68.     move.l    (a0)+,d0
  69.     bne.b    loop
  70.  
  71.     clr.l    (a1)            ; end list
  72.  
  73.     jsr    (-$27c,a6)        ; CacheClearU()
  74.  
  75.     jsr    (-$8a,a6)        ; Permit()
  76.  
  77. exit    movem.l    (sp)+,d0-a6
  78.     rts
  79.  
  80.  
  81. killtag    moveq    #-1,d0
  82.     move.l    a3,a2
  83. 1$:    addq.l    #1,d0
  84.     tst.b    (a2)+
  85.     bne.b    1$
  86.     move.l    (RT_NAME,a4),a2        ; name of current module
  87. 2$:    cmpm.b    (a2)+,(a3)+
  88.     dbne    d0,2$
  89.     bne.b    3$
  90.     subq.l    #4,a1            ; module name matched - kill it!
  91. 3$:    rts
  92.  
  93. da040_name
  94.     dc.b    '68040.library',0
  95.  
  96. da060_name
  97.     dc.b    '68060.library',0
  98.  
  99.  
  100. _name    dc.b    'BPPCFix040',0
  101.  
  102. _idstr    dc.b    'BPPCFix040 1.1 (7.3.00)',0
  103.     CNOP    0,2
  104. _end
  105.  
  106.     SECTION    VERSION,DATA
  107.  
  108.     dc.b    '$VER: BPPCFix040_MODULE 1.1 (7.3.00)',0
  109.  
  110.